package com.zjitc.dao;

import com.zjitc.model.Order;
import com.zjitc.model.OrderItem;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Create by IntelliJ IDEA
 *
 * @author: jsonor
 * @date-Time: 2018/5/15 17:02
 * @description:
 */
public interface OrderDao {

    void add(Order order);

    void addItems(OrderItem orderItem);

    List<Order> findByUid(String uid);

    List<OrderItem> findItems(String oid);

    void delete(String oid);

    void deleteItems(String oid);

    Order findByOid(String oid);

    List<OrderItem> findOrderItem(String oid);

    void updateOid(String oid);

    List<Order> findAllOrders();

    List<Order> findAllByState(Integer state);

    void updateRefund(String oid);

    void updateSend(@Param("oid") String oid, @Param("express") String express, @Param("state") Integer state);

    List<OrderItem> findByPid(String pid);

    void deletePid(String pid);

}
